/**
 * Created by rongyao on 2017/11/2.
 */
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);

export const store = new Vuex.Store({
	state:{
		login:false,
		modal2:false,
		picRowData:[],
	},
	getters:{
		login:state=>{
			return state.login
		},
		modal2:state=>{
			return state.modal2
		},
		picRowData:state=>{
			return state.picRowData
		}
	},
	mutations:{
		checkLogin:(state,payload)=>{
			state.login=payload
		},
		checkmodal2:(state,payload)=>{
			state.modal2=payload
		},
		checkpicRowData:(state,payload)=>{
			state.picRowData.push(payload)
		}
	},
	actions:{
		checkLogin:({commit},payload)=>{
			commit('checkLogin',payload)
		},
		checkmodal2:({commit},payload)=>{
			commit('checkmodal2',payload)
		},
		checkpicRowData:({commit},payload)=>{
			commit('checkpicRowData',payload)
		}
	}
})